package com.wyl.auth.vo;

import cn.hutool.core.lang.tree.Tree;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Description
 * @Author WuYiLong
 * @Date 2025/4/20 16:51
 */
@Data
public class CurrentUserVo {
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "树形菜单")
    private List<Tree<Long>> menuTrees;
    @ApiModelProperty(value = "角色")
    private List<UserPermissionVo.Role> role;
    @ApiModelProperty(value = "菜单编码")
    private List<String> menuCodes;
    @ApiModelProperty(value = "头像")
    private String avatar;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "手机号")
    private String phone;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "性别")
    private Integer sex;

    @Data
    public static class Role{
        @ApiModelProperty(value = "角色名称")
        private String roleName;
        @ApiModelProperty(value = "角色编码")
        private String roleCode;
    }
}